In the conventional technology, when an electronic device having audio playing function, such as a mobile phone, a tablet computer, a television, or a speaker, receives a playing instruction corresponding to an audio or video file, the electronic device can directly play audio data in the audio or video file using a default audio output channel. However, this may affect people nearby. For example, if a video file is played at midnight and the default audio output channel is a high-power speaker, other people, such as family members or neighbors, can be disturbed.